package gui.menu.stateDiagram;

import data.DataVector;
import data.stateDiagram.State;
import gui.commands.CommandManager;
import gui.commands.stateDiagramCommands.DeleteStateCommand;
import gui.menu.RibbonButton;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * User: Szymon Kudzia
 * Date: 22.05.13
 * Time: 14:03
 */
public class DeleteTransitionItem extends RibbonButton implements ActionListener {

	public DeleteTransitionItem() {
		super("icons/deleteTransition.png", "Delete", "Delete transition");
		addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent actionEvent) {
		if (DataVector.getInstance().getActiveStateDiagram() == null) return;

		DeleteTransitionForm d = new DeleteTransitionForm();
		d.pack();
		d.setVisible(true);
	}
}
